//    Copyright (C) Kherty.  All rights reserved.
using OpenLS.Core.Serialization;

namespace OpenLS.Drawing.Diagram
{
    class Parameter: IOfficeXmlSerializable
    {
        private ParameterId _type;
        private string _val;

        public void ReadXml(ReadContext context)
        {
            using (var c = context.Read("param"))
            {
                _type = c.GetEnum<ParameterId>("type");
                _val = c.GetString("val");
            }

        }

        public void WriteXml(WriteContext context)
        {
            using (var c = context.Write("param"))
            {
                c.SetEnum<ParameterId>("type", _type);
                c.SetString("val",_val);
            }

        }
    }
}